home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Debug / DebugTimer.cp < prev    next >
Text File  |  1997-06-28  |  427b  |  32 lines

  1. // DebugTimer.cp
  2.  
  3. #ifndef DebugTimer_h
  4. #include "DebugTimer.h"
  5. #endif
  6. #ifndef __Timer__
  7. #include <Timer.h>
  8. #endif
  9. #ifndef DebugMessage_h
  10. #include "DebugMessage.h"
  11. #endif
  12.  
  13. DebugTimer::DebugTimer()
  14.   : start( Now() )
  15.   {
  16.   }
  17.  
  18. DebugTimer::~DebugTimer()
  19.   {
  20.     uint32 time = Now() - start;
  21.     
  22.     DebugMessage message;
  23.     message += time;
  24.     message += "\p ticks";
  25.     message.Show();
  26.   }
  27.  
  28. uint32 DebugTimer::Now()
  29.   {
  30.     return TickCount();
  31.   }
  32.